package sortForeign;

import org.apache.hadoop.mapreduce.Reducer;
import sum.CityForeignMarriages.SumCityFoMarriagesBean;

import java.io.IOException;

public class sortCityForeignReducer extends Reducer<sortCityForeignBean, SumCityFoMarriagesBean,SumCityFoMarriagesBean,sortCityForeignBean> {
    @Override
    protected void reduce(sortCityForeignBean key, Iterable<SumCityFoMarriagesBean> values, Reducer<sortCityForeignBean, SumCityFoMarriagesBean, SumCityFoMarriagesBean, sortCityForeignBean>.Context context) throws IOException, InterruptedException {
        SumCityFoMarriagesBean outValue = values.iterator().next();
        context.write(outValue,key);
    }
}
